package com.room.mapper;

import com.room.pojo.Teachaer;
import com.room.pojo.Visit;
import com.room.pojo.vo.VisitVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface VisitMapper {
    int deleteByPrimaryKey(Integer visitId);

    int insert(Visit record);

    int insertSelective(Visit record);

    Visit selectByPrimaryKey(Integer visitId);

    int updateByPrimaryKeySelective(Visit record);

    int updateByPrimaryKey(Visit record);

//    List<Teachaer> getTeaByPage(@Param("start")Integer start, @Param("size")Integer size);

    List<Visit> getVisitByPage(@Param("start")Integer start, @Param("size")Integer size);

    @Select("select count(*) from visit")
    long getTotal();


    int deleteVisitById(@Param("ids")String[] ids);


    @Select("select visit_id as visitId , visit_name as visitName , sex as sex , phone as phone , bedroom_name as bedroomName , visit_time as visitTime , card_type as cardType , visit_Idcard as visitIdcard from visit where bedroom_name = #{bedroomName}")
    List<Visit> getVisitByRoom(String bedroomName);


}